/**
 * 
 */
package com.net.shop.car.manager.api.volley.request;

import org.json.JSONException;
import org.json.JSONObject;

import com.net.shop.car.manager.api.volley.Request;
import com.net.shop.car.manager.utils.Constants;
import com.net.shop.car.manager.utils.Constants.ServiceType;
import com.net.shop.car.manager.utils.LogUtils;

/**
 * 请使用SellerListResponse作响应
 * @author Deve xu
 *
 */
public class GetSellerList extends Request {
	
	private final ServiceType type;
	
	private final String lon;
	
	private final String lat;
	
	private final int page;

	
	
	public GetSellerList(ServiceType type, String lon, String lat,
			int page) {
		super(Constants.SELLER_LIST);
		this.type = type;
		this.lon = lon;
		this.lat = lat;
		this.page = page;
	}


	/* (non-Javadoc)
	 * @see com.net.shop.car.manager.api.volley.Request#extensionJSON(org.json.JSONObject)
	 */
	@Override
	public void extensionJSON(JSONObject jsonObject) {
		try {
			jsonObject.put("dic_type", type.description);
			jsonObject.put("lon", lon);
			jsonObject.put("lat", lat);
			jsonObject.put("page", page);
		} catch (JSONException e) {
			LogUtils.e(e.getMessage());
		}
	}

}
